﻿<%@ Page Title="Cadastro de Usuários" Language="C#" MasterPageFile="~/Site.Master"
    EnableEventValidation="false" AutoEventWireup="true" CodeBehind="CadastroUsuario.aspx.cs"
    Inherits="GerTestes.Cadastros.CadastroUsuario" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .table-condensed
        {
        }
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 215px;
        }
        .style3
        {
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="pnlConsulta" runat="server">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">Consulta Usuários</h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                            <div style="margin-right: 20px; margin-top: 2.5px;">
                                <asp:TextBox ID="TxtPesquisaGrid" ClientIDMode="Static" CssClass="pesquisa" Width="250px"
                                    placeholder="Localizar..." runat="server" MaxLength="50"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <asp:GridView ClientIDMode="Static" ID="gvwUsuarios" runat="server" CssClass="table table-bordered table-striped table-condensed gridDinamica"
                            EmptyDataText="Registros não localizados..." AutoGenerateColumns="False" Width="101%"
                            OnRowCommand="gvwUsuarios_RowCommand" OnRowCreated="gvwUsuarios_RowCreated" OnRowDataBound="gvwUsuarios_RowDataBound"
                            GridLines="None" DataKeyNames="ID_USUARIO" PageSize="100">
                            <Columns>
                                <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                                    <ItemTemplate>
                                        <abbr title="Editar usuário!">
                                            <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                                ImageUrl="~/assets/img/edit.png" Text="Alterar" Width="25px" />
                                        </abbr>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                                    <ItemTemplate>
                                        <abbr title="Excluir usuário!">
                                            <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                                ImageUrl="~/assets/img/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                                Text="Excluir" Width="25px" />
                                        </abbr>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="NOME" HeaderText="Nome">
                                    <ItemStyle HorizontalAlign="Left" Width="50%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="FUNCAO" HeaderText="Função">
                                    <ItemStyle HorizontalAlign="Center" Width="25%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="EMAIL" HeaderText="E-mail">
                                    <ItemStyle HorizontalAlign="Center" Width="25%" />
                                </asp:BoundField>
                            </Columns>
                            <PagerStyle CssClass="pagination" Wrap="True" />
                            <PagerTemplate>
                                <div id="page-selection" class="pagination-centered">
                                </div>
                            </PagerTemplate>
                        </asp:GridView>
                        <asp:Button ID="btnIncluir" formnovalidate="formnovalidate" runat="server" Text="Incluir"
                            OnClick="btnIncluir_Click" />
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>
    <br />
    <asp:Panel ID="pnlEdicao" runat="server" Visible="False">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">
                                <asp:Label ID="lblDescricaoOnlEdicao" runat="server" Text="Inclusão Usuário"></asp:Label></h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                    </div>
                    <div class="panel-body">
                        <table class="style1">
                            <tr>
                                <td class="style2">
                                    <asp:Label ID="Label1" runat="server" Text="Usuário"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="TxtUsuario" type="text" class="form-control" runat="server" Width="200px"
                                        MaxLength="150"></asp:TextBox>
                                </td>
                                <td>
                                    <span class="break">
                                        <asp:Label ID="Label2" runat="server" Text="E-mail"></asp:Label>
                                        <br />
                                        <asp:TextBox ID="TxtEmail" runat="server" class="form-control" type="email" Width="300px"
                                            MaxLength="100" AutoCompleteType="Email"></asp:TextBox>
                                    </span>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    <asp:Label ID="Label3" runat="server" Text="Regra"></asp:Label>
                                    <br />
                                    <asp:DropDownList ID="ddlRegra" runat="server" Width="200px">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Label ID="Label4" runat="server" Text="Nível"></asp:Label>
                                    <br />
                                    <asp:DropDownList ID="ddlNivel" runat="server" Width="180px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                        <div>
                            <table class="style1">
                                <tr>
                                    <td class="style3">
                                        <asp:Label ID="Label5" runat="server" Text="Foto"></asp:Label>
                                        <span class="break">
                                            <br />
                                            <asp:FileUpload ID="fupld" runat="server" Width="218px" />
                                        </span>&nbsp;
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <asp:Button ID="btnConfirmar" runat="server" Text="Confirmar" OnClick="btnConfirmar_Click" />
                            <asp:Button ID="btnCancelar" formnovalidate="formnovalidate" runat="server" Text="Cancelar"
                                OnClick="btnCancelar_Click" />
                        </div>
                    </div>
                </div>
            </div>
    </asp:Panel>
</asp:Content>
